import { MigrationInterface, QueryRunner } from 'typeorm';

export class CoffeeMigration1664118862386 implements MigrationInterface {
  /**
   * 提示需要更改的内容
   */
  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALERT TABLE "coffee" ALERT COLUMN "name" RENAME TO "title"`,
    );
  }

  /**
   * 提示撤销回滚的修改，退出策略
   */
  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALERT TABLE "coffee" RENAME COLUMN "title" TO "name"`,
    );
  }
}
